Skip to content

Add CI/CD checks and CONTRIBUTING.md#39

Merged
JFoederer merged 19 commits into
JFoederer:mainfrom
MASTERS-Y2Q1-ISEP:cicd/autopep8-JFoedererPR
Dec 18, 2025
Merged

Add CI/CD checks and CONTRIBUTING.md#39
JFoederer merged 19 commits into
JFoederer:mainfrom
MASTERS-Y2Q1-ISEP:cicd/autopep8-JFoedererPR

Conversation

@osingaatje
Copy link
Copy Markdown
Contributor

@osingaatje osingaatje commented Dec 3, 2025

You can fix the formatting by installing and running autopep8:

pip install autopep8
python -m autopep8 --in-place --recursive --jobs 0 ./

..this will make the check pass if all is well.

see: https://pypi.org/project/autopep8/#usage

@osingaatje
Copy link
Copy Markdown
Contributor Author

you might also need to enable github CI/CD on PRs - somehwere in github settings.

@osingaatje
Copy link
Copy Markdown
Contributor Author

osingaatje commented Dec 3, 2025

some documentation might be useful - please indicate where you want the info on how to run autopep8 etc., then I can add that (or you can quickly if you feel like it) :)

@JFoederer
Copy link
Copy Markdown
Owner

Thank you for this pull request @osingaatje. I think I'll need to read a bit more about GitHub workflows to fully understand how to set this up.

Copy link
Copy Markdown
Owner

@JFoederer JFoederer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I ran the autopep8 locally with max-line-lenght 120 and in general the result looks good. The choice for the exact max line length is debatable.

The only construct used in this code base for which I feel pep8 doesn't have an equal or better alternative are the multi-line comments that start inline. The way it re-formats those would indicate, according to their own description, that the extra lines post comments on the code after. On the other hand I feel that writing all comments before breaks the flow of the code too much in places.

Comment thread .github/workflows/run-tests.yml
Comment thread .github/workflows/run-tests.yml
Comment thread .github/workflows/run-tests.yml Outdated
Comment thread .github/workflows/run-tests.yml Outdated
Comment thread .github/workflows/run-tests.yml
Comment thread .github/workflows/run-tests.yml Outdated
@osingaatje osingaatje force-pushed the cicd/autopep8-JFoedererPR branch from b26d7dc to a1db9d5 Compare December 8, 2025 09:13
@osingaatje
Copy link
Copy Markdown
Contributor Author

I agree with the arbitrary choice of max line length, that's why I kept the formatting check on the default settings.

Same with the multi-line comments. PEP8 is what Python officially states as the standard so I'm not going to quibble about the exact formatting of lines, as long as they're done the same way every time.

@osingaatje
Copy link
Copy Markdown
Contributor Author

By the way, an example of when CI/CD is turned on:
2025-12-04_AutoPEP8 check on PR

@JFoederer
Copy link
Copy Markdown
Owner

Same with the multi-line comments. PEP8 is what Python officially states as the standard so I'm not going to quibble about the exact formatting of lines, as long as they're done the same way every time.

Yes, I agree. Being predictable is better than being perfect. I pointed out that one commenting rule, because after reformatting the code does not comply with the guidelines. Part of the comments are at the wrong side of the code.

@JFoederer
Copy link
Copy Markdown
Owner

It looks like I cannot configure, enable or trigger the workflow until it is (also) on main. I was able to find the runs on your fork, so if we can get it to a point where everything passes using the final configuration, then we should be good to go.

@JFoederer
Copy link
Copy Markdown
Owner

I updated the formatting on the PR branch, but cannot push it. If you want it, you probably need to check 'allow editing by maintainer'.

@JFoederer
Copy link
Copy Markdown
Owner

And regarding your documentation question. I think it is time to start a contributing readme.

@osingaatje
Copy link
Copy Markdown
Contributor Author

Same with the multi-line comments. PEP8 is what Python officially states as the standard so I'm not going to quibble about the exact formatting of lines, as long as they're done the same way every time.

Yes, I agree. Being predictable is better than being perfect. I pointed out that one commenting rule, because after reformatting the code does not comply with the guidelines. Part of the comments are at the wrong side of the code.

sounds like a bug report to autopep8 :)

@osingaatje
Copy link
Copy Markdown
Contributor Author

I updated the formatting on the PR branch, but cannot push it. If you want it, you probably need to check 'allow editing by maintainer'.

I don't see it currently unfortunately :(

@osingaatje
Copy link
Copy Markdown
Contributor Author

And regarding your documentation question. I think it is time to start a contributing readme.

probably a good idea :)

@osingaatje osingaatje force-pushed the cicd/autopep8-JFoedererPR branch from 9bbbf4f to 57e8d29 Compare December 9, 2025 14:08
@osingaatje
Copy link
Copy Markdown
Contributor Author

I rebased with your current main and formatted the code in 57e8d29

@osingaatje
Copy link
Copy Markdown
Contributor Author

I updated the formatting on the PR branch, but cannot push it. If you want it, you probably need to check 'allow editing by maintainer'.

did formatting myself in 57e8d29

Comment thread robotmbt/suitedata.py Outdated
Comment thread robotmbt/suitedata.py Outdated
Comment thread .github/workflows/autopep8.yml Outdated
@JFoederer
Copy link
Copy Markdown
Owner

JFoederer commented Dec 12, 2025

Remaining tasks for this PR:

  • add workflow file for run_demo miss and run_demo extended
  • Create first basic contributing guideline document
  • Check that all workflows pass
  • Merge and enable workflow on main

@JFoederer
Copy link
Copy Markdown
Owner

@osingaatje, can you help to check the latest commits?

@JFoederer
Copy link
Copy Markdown
Owner

Reminder: exit code propagation is not in place yet for the demo runs.

@osingaatje
Copy link
Copy Markdown
Contributor Author

@JFoederer robotnl is not in the dependencies (demo/Titanic/MapLib.py)

@osingaatje
Copy link
Copy Markdown
Contributor Author

otherwise all tests pass

@JFoederer
Copy link
Copy Markdown
Owner

@JFoederer robotnl is not in the dependencies (demo/Titanic/MapLib.py)

Thanks for checking. The demo has its own requirements.txt, so I guess I picked the wrong installation method.

@JFoederer
Copy link
Copy Markdown
Owner

By the way, the demo also has some optional dependencies. The manual now asks to install them separately if you want to use the graphical enhancements.

I would like to improve this by using the optional dependencies structure you showed before. We will not include that in this PR though. Maybe it can be combined with the extra options needed for the graphs later on.

@JFoederer
Copy link
Copy Markdown
Owner

so I guess I picked the wrong installation method.

Or wrong working directory for the 'Install dependencies' step?

@osingaatje
Copy link
Copy Markdown
Contributor Author

I would like to improve this by using the optional dependencies structure you showed before. We will not include that in this PR though. Maybe it can be combined with the extra options needed for the graphs later on.

That is definitely possible. I will put a TODO in our team's Trello for this, once we have the final PRs ready.

@osingaatje osingaatje changed the title Add CI/CD checks (run_tests and autopep8) Add CI/CD checks and CONTRIBUTING.md Dec 17, 2025
@osingaatje
Copy link
Copy Markdown
Contributor Author

contributing

see my improvements at b680d92

@JFoederer
Copy link
Copy Markdown
Owner

@osingaatje, which style guide did you use for .md? I am getting a few new warnings. For instance on missing white lines around headings.

And thank you for the improvements. Most were ok, but you also found one that was open for interpretation. I think I clarified that now.

@osingaatje
Copy link
Copy Markdown
Contributor Author

I did not use any style guide... just what I found nice to read (I don't often render the markdown)

@JFoederer
Copy link
Copy Markdown
Owner

Ok, clear. No problem, I will fix the .md linting issues and wrap it up.

@JFoederer JFoederer merged commit 097ee40 into JFoederer:main Dec 18, 2025
@JFoederer
Copy link
Copy Markdown
Owner

Unfortunately the final check, on main, failed: PR #41

@JFoederer
Copy link
Copy Markdown
Owner

A fix is now included in PR #41. All done.

@osingaatje osingaatje deleted the cicd/autopep8-JFoedererPR branch December 20, 2025 19:48
@osingaatje
Copy link
Copy Markdown
Contributor Author

Very nice! Thank you for the cooperation, nice to see it in action in pr #41 :)

@JFoederer
Copy link
Copy Markdown
Owner

Yes, I agree. On both accounts. That was good work together!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants